import { ref } from 'vue';

import { CommonAnyData } from '@/api/model/common';

import CardBatch from './components/cardBatch/index.vue';
import CardDialog from './components/cardDialog/index.vue';
import CardJump from './components/cardJump/index.vue';
import CardSimple from './components/cardSimple/index.vue';
import CardTree from './components/cardTree/index.vue';
import TableBatch from './components/tableBatch/index.vue';
import TableDialog from './components/tableDialog/index.vue';
import TableJump from './components/tableJump/index.vue';
import TableSimple from './components/tableSimple/index.vue';
import TableTree from './components/tableTree/index.vue';

export const tabList = ref([
  { label: '表格（仅展示）', value: 'tableSimple' },
  { label: '表格（批量选择）', value: 'tableBatch' },
  { label: '表格（侧边树状）', value: 'tableTree' },
  { label: '表格（弹框）', value: 'tableDialog' },
  { label: '表格（跳转）', value: 'tableJump' },
  { label: '卡片（仅展示）', value: 'cardSimple' },
  { label: '卡片（批量选择）', value: 'cardBatch' },
  { label: '卡片（侧边树状）', value: 'cardTree' },
  { label: '卡片（弹框）', value: 'cardDialog' },
  { label: '卡片（跳转）', value: 'cardJump' },
]);

export const componentsMap: CommonAnyData = {
  tableSimple: TableSimple,
  tableBatch: TableBatch,
  tableTree: TableTree,
  tableDialog: TableDialog,
  tableJump: TableJump,
  cardSimple: CardSimple,
  cardBatch: CardBatch,
  cardTree: CardTree,
  cardDialog: CardDialog,
  cardJump: CardJump,
};
